<!--<h2><%?heading%></h2>-->
<%form%>
<table class='panel' width='100%'>
  <%?caption%>
  <%?colgroup%>
  <tr>	<%?label_author%>			<%?field_author%>			</tr>
  <tr>	<%?label_created%>			<%?field_created%>			<%?label_modified%>			<%?field_modified%>			</tr>
  <tr>	<%?label_priority%>			<%?field_priority%>			<%?label_maturity%>			<%?field_maturity%>			</tr>
  <tr>	<%?label_topic_id%>			<%?field_topic_id%>			</tr>
  <tr>	<%?label_title%>			<%?field_title%>			</tr>
  <tr>	<%?label_description%>		<%?field_description%>		</tr>
  <tr>	<%?label_precondition%>		<%?field_precondition%>		</tr>
  <tr>	<td></td>					<%?field_button%>			</tr>
</table>
<style>
select.priority1, option.priority1 {
	background-color: red;
	}
select.priority2, option.priority2 {
	background-color: orange;
	}
select.priority3, option.priority3 {
	background-color: yellow;
	}
select.priority4, option.priority4 {
	background-color: lightgreen;
	}


select.maturity0, option.maturity0 {
	background-color: red;
	}
select.maturity1, option.maturity1 {
	background-color: orange;
	}
select.maturity2, option.maturity2 {
	background-color: yellow;
	}
select.maturity3, option.maturity3 {
	background-color: lightgreen;
	}
select.maturity4, option.maturity4 {
	background-color: green;
	}
select.maturity5, option.maturity5 {
	background-color: lightblue;
	}
</style>

<script>
$("#edit_case_maturity option").each(function(){
  value=$(this).attr('value');
  switch(value){
    case '0': $(this).addClass('maturity0'); break;
    case '1': $(this).addClass('maturity1'); break;
    case '2': $(this).addClass('maturity2'); break;
    case '3': $(this).addClass('maturity3'); break;
    case '4': $(this).addClass('maturity4'); break;
    case '5': $(this).addClass('maturity5'); break;
    default: alert(value); break;
  }
});
$("#edit_case_priority option").each(function(){
  value=$(this).attr('value');
  switch(value){
    case '1': $(this).addClass('priority1'); break;
    case '2': $(this).addClass('priority2'); break;
    case '3': $(this).addClass('priority3'); break;
    case '4': $(this).addClass('priority4'); break;
    default: alert(value); break;
  }
});
$("#edit_case_maturity").each(function(){
  $(this).addClass($("option[@selected]",this).attr('class'));
});
$("#edit_case_priority").each(function(){
  $(this).addClass($("option[@selected]",this).attr('class'));
});
</script>
</form>